package com.base.component;

public class Pager
{
    private Integer offset = 0;

    private Integer size = 10;
    
    private Integer pageNum = 1;
    
    private Long totalSize = 0l;
    
    private Integer totalPage;

	private String[] props;
	
	private String[] values = new String[]{""};
	
	public Long getTotalSize() {
		return totalSize;
	}

	public void setTotalSize(Long totalSize) {
		this.totalSize = totalSize;
	}

	public Integer getOffset()
    {
		if(pageNum == 1)
		{
			return 0;
		}
		else
		{
			return (pageNum - 1)*size;
		}
    }

    public void setOffset(Integer offset)
    {
        this.offset = offset;
    }

    public Integer getSize()
    {
        return size;
    }

    public void setSize(Integer size)
    {
        this.size = size;
    }
    
    public Integer getPageNum() {
		return pageNum;
	}

	public void setPageNum(Integer pageNum) {
		this.pageNum = pageNum;
	}


    public void setTotalPage(Integer totalPage) {
		this.totalPage = totalPage;
	}

	public Integer getTotalPage() {
		return totalPage;
	}

	@Override
	public String toString() {
		return "Pager [offset=" + offset + ", size=" + size + ", totalSize="
				+ totalSize + "]";
	}

	public String[] getProps() {
		return props;
	}

	public void setProps(String[] props) {
		this.props = props;
	}

	public String[] getValues() {
		return values;
	}

	public void setValues(String[] values) {
		this.values = values;
	}

}
